;;; keybindings.el --- ctrl-better-defaults Layer keybindings File for Spacemacs
;;

;; in evil insert mode, insert an empty line after the current line.
(global-set-key [(shift return)] 'ctrl/smart-open-line)
;; indent editing buffer or selected code
(global-set-key (kbd "C-M-\\") 'ctrl/indent-region-or-buffer)
;; Rename the current buffer and file it is visiting.
(spacemacs/set-leader-keys "fR" 'ctrl/rename-file-and-buffer)

(spacemacs/set-leader-keys "od" 'ctrl/occur-dwim)

;; in evil normal state binding key Ctrl-e use
;; mwim-end-of-line-or-cod not evil-scroll-line-down
(define-key evil-normal-state-map (kbd "C-e") #'mwim-end-of-line-or-code)

;; define key Ctrl-. as delete-backward-char
(define-key evil-hybrid-state-map (kbd "C-.") #'delete-backward-char)
